package edu.hitsz.prop;

import edu.hitsz.aircraft.HeroAircraft;

public class BloodProp extends BaseProp {
    private int hp = 30;

    public BloodProp(int locationX, int locationY, int speedX, int speedY) {
        super(locationX, locationY, speedX, speedY);
    }
    public void Active(HeroAircraft heroAircraft) {
        heroAircraft.decreaseHp(-hp);
        if (heroAircraft.getHp() > heroAircraft.getMaxHp()) {
            heroAircraft.decreaseHp(heroAircraft.getHp() - heroAircraft.getMaxHp());
        }
        get_supply_sound();
        vanish();
    }
}
